package cn.yzstu.reactive;

import reactor.core.publisher.Flux;

import javax.print.event.PrintEvent;



/**
 * @author Baldwin
 */
public class ReactiveProgram {
    public static Flux<Boy> getBoyList() {
        return Flux.just(new Boy("Jack", 21),
                new Boy("Baldwin", 18),
                new Boy("Tom", 35));
    }

    public static void main(String[] args) {
        getBoyList().filter(boy -> {
            return "Baldwin".equals(boy.getName());
        }).blockFirst();
    }
}
